/*
 * FIEvaluationFunction.h
 *
 *  Created on: Sep 20, 2012
 *      Author: lfelipe
 */

#ifndef FIEVALUATIONFUNCTION_H_
#define FIEVALUATIONFUNCTION_H_

#include "EvaluationFunction.h"

class FiEvaluationFunction : public  EvaluationFunction
{
public:
    FiEvaluationFunction(){}
    virtual ~FiEvaluationFunction(){}

    double operator()(double value){
        if(value < 0.1){
            return value;
        }
        if( value < 0.5){
            return (3 * value) - 0.2;
        }
        if( value  < 0.9){
            return (10 * value) - 3.7;
        }
        if( value  < 1){
            return (70 * value) - 57.7;
        }
        if( value  < 1.1){
            return (500 * value) - 487.7;
        }
        if( value  < 2){
            return (5000 * value) - 5437.7;
        }
        return (5000*value);
    }

    virtual double getValue(double value){
        return operator ()(value);
    }

    virtual std::string getName() const{
        return "Fi Function";
    }

};

#endif /* FIEVALUATIONFUNCTION_H_ */
